﻿using System;

namespace diantou.dataModel
{
    /// <summary>
    /// 回答
    /// </summary>
    [fastCSharp.emit.jsonSerialize(IsAllMember = true)]
    [fastCSharp.emit.jsonParse(IsAllMember = true)]
    [fastCSharp.emit.dataSerialize(IsReferenceMember = false, IsMemberMap = false)]
    [fastCSharp.code.cSharp.webView.clientType(Name = "diantou.answer")]
    [fastCSharp.code.cSharp.sqlModel]
    public partial class answer
    {
        /// <summary>
        /// 回答标识
        /// </summary>
        [fastCSharp.code.cSharp.webView.outputAjax] 
        public int Id;
        /// <summary>
        /// 问题标识
        /// </summary>
        [fastCSharp.emit.dataMember(PrimaryKeyIndex = 1)]
        public int QuestionId;
        /// <summary>
        /// 用户标识
        /// </summary>
        [fastCSharp.emit.dataMember(PrimaryKeyIndex = 2)]
        //[fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
        [fastCSharp.code.cSharp.webView.outputAjax(IsIgnoreCurrent = true)]
        public int UserId;
        /// <summary>
        /// 回答时间
        /// </summary>
        public DateTime AnswerTime = fastCSharp.date.NowSecond;
        /// <summary>
        /// 最后保存草稿时间
        /// </summary>
        public DateTime LastDraftTime = fastCSharp.date.NowSecond;
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime LastTime = fastCSharp.date.NowSecond;
        /// <summary>
        /// 准确答案赞同的可用分
        /// </summary>
        public int CreditPoint;
        /// <summary>
        /// 评论数
        /// </summary>
        public int CommentCount;
        /// <summary>
        /// 草稿
        /// </summary>
        [fastCSharp.emit.dataMember(MaxStringLength = 128 << 10)]
        public string Draft = string.Empty;
        /// <summary>
        /// 回答内容
        /// </summary>
        [fastCSharp.emit.dataMember(MaxStringLength = 128 << 10)]
        public string Content = string.Empty;
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDelete;

        /// <summary>
        /// 赞成数
        /// </summary>
        [fastCSharp.emit.dataMember(IsIgnoreCurrent = true)]
        public int AgreeCount;
        /// <summary>
        /// 反对数
        /// </summary>
        [fastCSharp.emit.dataMember(IsIgnoreCurrent = true)]
        public int OpposeCount;
        /// <summary>
        /// 没有帮助数
        /// </summary>
        [fastCSharp.emit.dataMember(IsIgnoreCurrent = true)]
        public int NoHelpCount;
        /// <summary>
        /// 收藏次数
        /// </summary>
        [fastCSharp.emit.dataMember(IsIgnoreCurrent = true)]
        public int FavoriteCount;
    }
}
